<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 100%;
            height: 400px;
            /* 背景图片默认会x和y都平铺
                只图片比盒子小很多
            */
            background-image: url('./images/1.jpg');
            /* 让图片不平铺 */
            background-repeat: no-repeat;
            /* 沿着x平铺 */
            background-repeat: repeat-x;
            /* 沿着y平铺 */
            background-repeat: repeat-y;
        }
    </style>
</head>

<body>
    <div></div>
</body>

</html>